<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>css中的100%</title>
    <style>
      .box{
        height: 400px; 
        width: 500px; 
        background-color: red;
        padding-top: 20px;

        /* overflow: hidden; */

        display: flex;
        /* flex-wrap: wrap; */
        flex-direction: column;
      }
      .box1 {
        height: 50px;
        width: 100%;
        background-color: #0000ff;
        flex-basis: 50px;
        flex-shrink: 0;
      }
      .box11{
        width: 100%;
      }
      .box2 {
        height: 100%;
        width: 30px;
        align-items: stretch;
        flex-grow: 1;
        background-color: aqua;
      }
      /* 结论：100% 就是和父盒子等宽或高，可以使用弹性布局加弹性系数来布局 */
    </style>
  </head>

  <body>
    <div class="box">

      <div class="box1">bo2x1
        <div class="box11"></div>
      </div>
      <div class="box2">box2</div>
    </div>
  </body>
</html>
